<template>
  <div>
    <el-container>
      <el-header id="header">
        <div id="order_top">
          停车场物业菜单栏
        </div>
      </el-header>
      <el-container id="container">
        <el-aside style="background-color: aquamarine;width: 15%;height: 100%;">
          <el-row>
            <el-col :span="24" style="height: 690px;">
              <el-menu style="height: 100%;" default-active="1" class="el-menu-vertical-demo" @open="handleOpen"
                @close="handleClose" background-color="#ffffff" text-color="#000000" active-text-color="#ffaa00">
                  <el-submenu index="1-0">
                     <template slot="title"><i class="el-icon-message"></i>订单管理</template>
                     <el-menu-item index="1" >
                       <!-- <i class="el-icon-setting"></i> -->
                       <span slot="title" class="order_menu_item" @click="toOrderInfo">订单信息</span>
                     </el-menu-item>
                     <el-menu-item index="2" >
                       <!-- <i class="el-icon-setting"></i> -->
                       <span slot="title" class="order_menu_item" @click="toOrderOvertime">超时订单</span>
                     </el-menu-item>
                     <el-menu-item index="3" >
                       <!-- <i class="el-icon-menu"></i> -->
                       <span slot="title" class="order_menu_item"   @click="toEntranceInfo">进出信息</span>
                     </el-menu-item>
                     <el-menu-item index="4">
                       <!-- <i class="el-icon-document"></i> -->
                       <span slot="title" class="order_menu_item"  @click="toOrderComment" >订单评论</span>
                     </el-menu-item>
                     <el-menu-item index="5" >
                       <!-- <i class="el-icon-setting"></i> -->
                       <span slot="title" class="order_menu_item" @click="toOrderLog">订单日志</span>
                     </el-menu-item>
                    <el-menu-item index="6">
                      <!-- <i class="el-icon-location"></i> -->
                      <span slot="title" class="order_menu_item"  @click="toCertifiedMoney">物业流水</span>
                    </el-menu-item>
                   </el-submenu>
                <el-menu-item index="7" >
                  <i class="el-icon-setting"></i>
                  <span slot="title" class="order_menu_item" @click="toStallInfo">车位管理</span>
                </el-menu-item>
                <el-menu-item index="8">
                  <i class="el-icon-setting"></i>
                  <span slot="title" class="order_menu_item" @click="toStallCheck">车位审核</span>
                </el-menu-item>
                <el-menu-item index="9" >
                  <i class="el-icon-setting"></i>
                  <span slot="title" class="order_menu_item" @click="toCertifiedInfo"  >物业信息</span>
                </el-menu-item>
                <el-menu-item index="10">
                  <i class="el-icon-setting"></i>
                  <span slot="title" class="order_menu_item"  @click="toDataInfo" >统计数据</span>
                </el-menu-item>

             

                <el-menu-item index="14">
                  <i class="el-icon-setting"></i>
                  <span slot="title" class="order_menu_item" @click="logout">退出登录</span>
                </el-menu-item>
              </el-menu>
            </el-col>
          </el-row>

        </el-aside>


        <el-main style=" background-color: bisque;width: 85%;height: 100%;">
          <template>
            <div>
              <router-view></router-view>
            </div>
          </template>
        </el-main>
      </el-container>
    </el-container>

  </div>
</template>

<script>
  export default {
    data() {
      return {
        // siteAccountDTO:{},//账号对象
      }
    },
    methods: {

      //物业流水
      toCertifiedMoney(){
        this.$router.push("/certifiedMoney").catch(error =>{
          console.log("重复导航")
        })
      },
      //进出信息
      toEntranceInfo(){
        this.$router.push("/EntranceInfo").catch(error =>{
          console.log("重复导航")
        })
      },
      //订单评论
      toOrderComment(){
        this.$router.push("/OrderComment").catch(error =>{
          console.log("重复导航")
        })
      },
      // 订单信息
      toOrderInfo(){
        this.$router.push("/OrderInfo").catch(error =>{
          console.log("重复导航")
        })
      },
      // 订单日志
      toOrderLog(){
        this.$router.push("/OrderLog").catch(error =>{
          console.log("重复导航")
        })
      },
      // 超时订单
      toOrderOvertime(){
        this.$router.push("/OrderOvertime").catch(error => {
          console.log("请勿重复导航");
        });
      },

      // 车位信息
      toStallInfo(){
        this.$router.push("/StallInfo").catch(error => {
          console.log("请勿重复导航");
        });
      },

      // 车位审核
      toStallCheck(){
        this.$router.push("/StallCheck").catch(error => {
          console.log("请勿重复导航");
        });
      },

      //物业信息
      toCertifiedInfo(){
        this.$router.push("/CertifiedInfo").catch(error => {
          console.log("请勿重复导航");
        });
      },


      //统计数据
      toDataInfo(){
        this.$router.push("/DataInfo").catch(error => {
          console.log("请勿重复导航");
        });
      },

      //退出登录
      logout(){
        this.$http.post("/certified/certifiedAccount/loginOut").then(resp=>{
          localStorage.removeItem("authorization")
          this.$router.push("/")
           // this.$message.error('退出成功,欢迎下次光临');
        })
      },
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    },
    created() {
      // this.checkAccount()
    }
  }
</script>

<style>
  .order_menu_item {
    font-size: 15px;
  }

  #order_top {
    text-align: center;
    line-height: 60px;
    font-size: 25px;
    background: linear-gradient(126deg,#fff5c3,#9452a5);
    /* background-color: #dcdcdc; */
    width: 100%;
    height: 100%;
  }


  #header {
    padding: 0%;
    height: 80px;
  }

  #container {
    width: 100%;
    height: 690px;
  }
</style>
